import Layout from '@/layout'

const marketingRouter = {
  path: '/marketing',
  component: Layout,
  meta: {
    title: '营销',
    icon: 'documentation',
    affix: false
  },
  children: [
    {
      path: 'seckill',
      component: () => import('@/views/marketing/seckill/index'), // Parent router-view
      name: 'seckill',
      meta: { title: '秒杀管理' },
      redirect: '/marketing/seckill/configuration',
      children: [
        {
          path: 'configuration',
          component: () => import('@/views/marketing/seckill/configuration'),
          name: 'configuration',
          meta: { title: '秒杀配置' }
        },
        {
          path: 'goods',
          component: () => import('@/views/marketing/seckill/goods'),
          name: 'goods',
          meta: { title: '秒杀商品' }
        }
      ]
    },
    {
      path: 'bargain',
      component: () => import('@/views/marketing/bargain/index'), // Parent router-view
      name: 'bargain',
      meta: { title: '砍价管理' },
      redirect: '/marketing/bargain/goods',
      children: [
        {
          path: 'goods',
          component: () => import('@/views/marketing/bargain/goods'),
          name: 'goods',
          meta: { title: '砍价商品' }
        },
        {
          path: 'list',
          component: () => import('@/views/marketing/bargain/list'),
          name: 'list',
          meta: { title: '砍价列表' }
        }
      ]
    },
    {
      path: 'like',
      component: () => import('@/views/marketing/like/index'), // Parent router-view
      name: 'like',
      meta: { title: '直播管理' },
      redirect: '/marketing/like/list',
      children: [
        {
          path: 'list',
          component: () => import('@/views/marketing/like/list'),
          name: 'list',
          meta: { title: '直播列表' }
        },
        {
          path: 'create',
          component: () => import('@/views/marketing/like/create'),
          name: 'create',
          meta: { title: '创建直播' }
        }
      ]
    },
    {
      path: 'group',
      component: () => import('@/views/marketing/group/index'), // Parent router-view
      name: 'group',
      meta: { title: '拼图管理' },
      redirect: '/marketing/group/goods',
      children: [
        {
          path: 'goods',
          component: () => import('@/views/marketing/group/goods'),
          name: 'goods',
          meta: { title: '拼图商品' }
        },
        {
          path: 'list',
          component: () => import('@/views/marketing/group/list'),
          name: 'list',
          meta: { title: '拼图列表' }
        }
      ]
    },
  ]
}
export default marketingRouter
